<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<meta charset="UTF-8" />
<head th:include="include/header"></head>
<body class="layui-layout-body">
	<div>
		<table class="layui-table">
			<thead>
				<tr>
					<th>昵称</th>
					<th>账号</th>
				</tr>
			</thead>
			<tbody id="table-body">
			</tbody>
		</table>
	</div>
	<script>
		layui.use('element', function() {
			var element = layui.element;
			$springboot.post("/user/list", {}, function(rs) {
				var html = "";
				$.each(rs, function(i, user) {
					html += '<tr>';
					html += '<td>'+user.name+'</td>';
					html += '<td>'+user.account+'</td>';
					html += '</tr>';
				});
				$("#table-body").html(html);
			});
		});
	</script>
</body>
</html>
